package cn.edu.bupt.scidata.service.impl;

import cn.edu.bupt.scidata.mapper.PaperMapper;
import cn.edu.bupt.scidata.model.paper.Fund;
import cn.edu.bupt.scidata.service.PaperFundService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PaperFundServiceImpl implements PaperFundService {
    @Autowired
    private PaperMapper paperMapper;
    @Override
    public List<Fund> queryfund(List<Integer> paperIds) {
        return paperMapper.queryfund(paperIds);
    }

    @Override
    public List<Fund> queryfundpage(List<Integer> paperIds, int pageNum, int pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        return paperMapper.queryfund(paperIds);
    }

    @Override
    public PageInfo<Fund> queryfundpagef(List<Integer> paperIds, int pageNum, int pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<Fund> lists = paperMapper.queryfund(paperIds);
        return new PageInfo<Fund>(lists);
    }
}
